<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - Bootstrap Table</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="/admin/favicon.ico"> <link href="/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/admin/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/admin/css/animate.css" rel="stylesheet">
    <link href="/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <script src="/admin/js/jquery.min.js?v=2.1.4"></script>
    <style>
        a{
            color:#777;
        }
    </style>

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <!-- Example Events -->
                    <div class="example-wrap">
                        <div class="example">
                            <div class="btn-group hidden-xs" id="tabtar" role="group">
                            </div>
                            <table data-toggle="table" id="table"> 
                                <thead>
                                    <tr>
                                        <th data-field="state" data-checkbox="true"></th>
                                        
                                        <th data-field="oid">订单号</th>
                                        <th data-field="username">买家</th>
                                        <th data-field="name">商品名</th>
                                        <th data-field="size">规格</th>
                                        <th data-field="color">颜色</th>
                                        <th data-field="num">数量</th>
                                        <th data-field="address">地址</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach($arr as $list)
                                    <tr>
                                        <td></td>
                                        <td>{{$list->o_id}}</td>
                                        <td>{{$list->username}}</td>
                                        <td>{{$list->name}}</td>
                                        <td>{{$list->size}}</td>
                                        <td>{{$list->color}}</td>
                                        <td>{{$list->num}}</td>
                                        <td>{{$list->address}}</td>
                                        <td>
                                            @if($list->state==0)
                                            <a class='btn btn-danger'>待付款</a>
                                            @elseif($list->state==1)
                                            <a class='btn btn-warning'>待发货</a>
                                            @elseif($list->state==2)
                                            <a class='btn btn-default'>待收货</a>
                                            @elseif($list->state==3)
                                            <a class='btn btn-default'>待评价</a>
                                            @else
                                            <a class="btn btn-success">已关闭</a>
                                            @endif
                                        </td>
                                        <td>
                                            @if($list->state==1)
                                            <a href="/admin/order/delivergoods?ogid={{$list->ogid}}" class='btn btn-primary deliver'>发货</a>
                                            @else
                                            --
                                            @endif
                                        </td>
                                    </tr>
                                    @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <!-- End Example Events -->
                </div>
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <script src="/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/admin/js/layer.js"></script>

    <!-- 自定义js -->
    <script src="/admin/js/content.js?v=1.0.0"></script>


    <!-- Bootstrap table -->
    <script src="/admin/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/admin/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
    <script src="/admin/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>

    <!-- jQuery Validation plugin javascript-->
    <!-- <script src='/admin/js/plugins/validate/jquery.validate.min.js'></script>
    <script src='/admin/js/plugins/validate/messages_zh.min.js'></script>

    <script src='/admin/js/demo/form-validate-demo.js'></script> -->
    <script src="/laydate/laydate.js"></script>

    <!-- Peity -->
    <!-- <script src="/admin/js/demo/bootstrap-table-demo.js"></script> -->
    <script src="/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script src="/admin/js/plugins/peity/jquery.peity.min.js"></script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <!--统计代码，可删除-->
    <script>
        $('.deliver').click(function(){
            layer.msg('发货成功',{icon:1});
        })
    </script>

    <script>
        // bt表格样式
        $('#table').bootstrapTable({
            search:true,
            showRefresh:true,
            showColumns:true,
            showToggle:true,
            pagination:true,
            cache:false,
            pageSize:'5',
            iconSize:'outline',
            toolbar: '#tabtar',
        });
        // 刷新功能
        // $('#table').bootstrapTable('refresh',{url:'/'});
    </script>

</body>

</html>
